import Vue from 'vue';
import VueRouter from 'vue-router';
Vue.use(VueRouter)
import Home from '../components/Home.vue'
import About from '../components/About.vue'
const routes = [
    {
        path: '/',
        component: Home
    },
    {
        path:'/home/:id',
        component:Home
    },
    {
        path:'/about',
        component:About
    }
]
const router = new VueRouter({
	routes,//出入的路由配置数组对象（路由路径和组件之间对应的关系）
	// 全局配置激活路由的class类名
	linkActiveClass:"myactive",
	// 改变路由模式:hash、history
	mode:'history'
})
export default router